//
//  GuestCouponWriteOffViewController.m
//  penzer
//
//  Created by 还带大道 on 2018/11/13.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "GuestCouponWriteOffViewController.h"

@interface GuestCouponWriteOffViewController ()
@property (weak, nonatomic) IBOutlet UIView *bgV;
@property (weak, nonatomic) IBOutlet UIView *navBar;
@property (weak, nonatomic) IBOutlet UIView *contentV;
@property (weak, nonatomic) IBOutlet UIButton *backBtn;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *navBarH;
@property (strong, nonatomic) IBOutlet UIView *alertView;
@property (weak, nonatomic) IBOutlet UITextField *count_tf;

@end

@implementation GuestCouponWriteOffViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.bgV.backgroundColor = RZ_COLOR_ALPHA(26, 29, 40, 0.61);
    self.navBarH.constant = kTopHeight;
    self.contentV.layer.cornerRadius = 15;
    UIImage *image = [[[UIImage imageNamed:@"左551"] imageScaledToSize:CGSizeMake(12, 18)] imageWithTintColor:[UIColor whiteColor]];
    [self.backBtn setImage:image forState:UIControlStateNormal];
    
}


- (IBAction)back:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}


#pragma mark--点击次数设置
- (IBAction)onClicksetCount {
    self.alertView.backgroundColor = RZ_COLOR_ALPHA(26, 29, 40, 0.61);
    self.alertView.frame = RZ_KEYWINDOW.bounds;
    self.count_tf.keyboardType = UIKeyboardTypeNumberPad;
    [RZ_KEYWINDOW addSubview:self.alertView];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap)];
    [self.alertView addGestureRecognizer:tap];
}


#pragma mark--次数设置确定
- (IBAction)completeCountSet {
    [self close];
}


- (IBAction)close {
    [self.alertView removeFromSuperview];
}

- (void)tap{
    [self.count_tf resignFirstResponder];
}

@end
